from flask_sqlalchemy import SQLAlchemy


from flask_login import LoginManager
import os


basedir = os.path.abspath(os.path.dirname(__file__))

login_manager = LoginManager()
#login_manager.init_app(app)
login_manager.session_protection = 'basic'
login_manager.login_view = 'main.login'
login_manager.login_message = u"请先登录。"

db = SQLAlchemy()